<?php /* Smarty version Smarty-3.1.13, created on 2013-08-14 00:28:46
         compiled from "/var/www/html/templates/en/user_group/edit.tpl" */ ?>
<?php /*%%SmartyHeaderCode:127473213151fe9bfa7378e0-14612401%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'e38317771da530cec13454195fa20f23f9b2b9d2' => 
    array (
      0 => '/var/www/html/templates/en/user_group/edit.tpl',
      1 => 1376409578,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '127473213151fe9bfa7378e0-14612401',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_51fe9bfa803592_56599283',
  'variables' => 
  array (
    'link_return' => 0,
    'msg' => 0,
    'action' => 0,
    'name' => 0,
    'status' => 0,
    'urlloaduser' => 0,
    'type_id' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_51fe9bfa803592_56599283')) {function content_51fe9bfa803592_56599283($_smarty_tpl) {?>  
  <script>
  var myusers = new Array();

  function checkAll(chk)
  {
    frm = document.frmAdmin;
    total = frm.usertotal.value;				 
    if(chk.checked) {
     for(i = 0; i < total; i++) {
       id = document.getElementById('chkUser' + i);
       id.checked = true;
     }		
    } else {
     for(i = 0; i < total; i++) {
       id = document.getElementById('chkUser' + i);
       id.checked = false;
     }		
    }
  }
  function addUsers(o)
  {
		frm = document.frmAdmin;
		if(o.checked) {
			$.get(frm.urlloaduser.value, { task: 'add', type_id:frm.type_id.value, id:o.value },
			 function(data){
				 
			 });			
		} else {
			$.get(frm.urlloaduser.value, { task: 'remove', type_id:frm.type_id.value, id:o.value },
			 function(data){
				 
			 });			
		}
		return;
    var v, i, j, frm;
    frm = document.frmAdmin;
    v = o.value;
    if(o.checked) {
      myusers[myusers.length] = v ;
    } else {
      var tmp = new Array();
      j=0;
      for(i=0;i<myusers.length;i++) {
        if(myusers[i] != v) {
          tmp[j] = myusers[i];
          j++;
        }
      }
      myusers = new Array();
      for(i=0;i<tmp.length;i++) {
        myusers[i] = tmp[i];
      }		
    }
    var st;
    st = '';
    for(i=0;i<myusers.length;i++) {
      st = st + myusers[i] + ';';
    }
    //frm.list_id.value = st;	
  
  }
  ////////////viewProduct
  function viewUsers(p)
  {
    var frm, btn;
    frm = document.frmAdmin;
    $("#loadUsers").html('<h1>Loading...</h1>');
    $.get(frm.urlloaduser.value, { p: p, type_id:frm.type_id.value, email:frm.s_email.value },
     function(data){
       $("#loadUsers").html(data);
     });	
    
    return false;	
  }
  </script>
  <style>
  form {
    margin: 0;
    padding: 0;
  }
  </style>
  
  
  <!-- Content Area -->
<div class="dma-thumbnail">
    <div class="content">
            
        <div class="header">
            
            <h1 class="page-title">Edit Group</h1>
        </div>
        
        <ul class="breadcrumb">
            <li><a href="#">Home</a> <span class="divider">/</span></li>
            <li><a href="<?php echo $_smarty_tpl->tpl_vars['link_return']->value;?>
">Group</a> <span class="divider">/</span></li>
            <li class="active">Edit</li>
        </ul>        
		<?php if ($_smarty_tpl->tpl_vars['msg']->value){?>
        <div class="alert alert-success">
         <button class="close" data-dismiss="alert" type="button">×</button>
        <?php echo $_smarty_tpl->tpl_vars['msg']->value;?>
   
        </div>
        <?php }?>    
        <div class="container-fluid">
        	<form name="frmAdmin" action="<?php echo $_smarty_tpl->tpl_vars['action']->value;?>
" method="post">
            <div class="row-fluid">
                <div class="btn-toolbar">
                    <button class="btn btn-primary" type="button" onclick="javascript:document.frmAdmin.submit();"><i class="icon-save"></i> Save</button>
                    <a href="<?php echo $_smarty_tpl->tpl_vars['link_return']->value;?>
" data-toggle="modal" class="btn">Cancel</a>
                  <div class="btn-group">
                  </div>
                </div>
                <div class="well">
                    
                        <label>Name</label>
                        <input type="text" name="name" maxlength="100" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['name']->value, ENT_QUOTES, 'UTF-8', true);?>
" size="30">
                        <label>Published</label>
                        <label class="checkbox inline">
                        	<input type="radio" id="publish1" name="publish" value="1"  <?php if ($_smarty_tpl->tpl_vars['status']->value){?>checked="checked"<?php }?> /> Yes
                        </label>
                        <label class="checkbox inline">
                        	<input type="radio" id="publish0" name="publish" value="0" <?php if (!$_smarty_tpl->tpl_vars['status']->value){?>checked="checked"<?php }?>  /> No
                        </label> 
                	
                </div>
				<div class="well">
                  <div class="filter-search">
                    <label>Email:</label>
                    	<input type="text" name="s_email" value=""  title="email"  class="input-medium search-query" />
                    <button type="button" class="btn" onclick="javascript:viewUsers(0);">Search</button>
                  </div>
                  <div>&nbsp;</div>
                  <div class="well">
                        <label>List Email:</label>
                          <div id="loadUsers"></div>                  

                       <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['urlloaduser']->value;?>
" name="urlloaduser" />
                        
                        <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['type_id']->value;?>
" name="type_id" />
				  </div>                                                           
                </div>                                                        
            </div>
            </form>
        </div>
    </div>
</div>

    
    <noscript>
    Warning! JavaScript must be enabled for proper operation of the Administrator backend.
    </noscript>
    <div class="clr"></div>
  </div>
  
  <script>
    viewUsers(0);
  </script>
  
  <!-- end of content --><?php }} ?>